/* ── Spinner: レコメンデーション読み込み中 ── */
#chatplusview .cp-recommend-spinner {
	padding: 10px 0 0 0;
	margin: 0;
	color: #86b6f9;
	font-size: 1.2em;
	text-align: center;
}
#chatplusview .cp-recommend-spinner i {
	font-size: 1.5em;
}
#chatplusview .cp-recommend-spinner-main {
	display: block;
	font-size: 0.75em;
}
#chatplusview .cp-recommend-spinner-main i {
	margin-right: 4px;
}
#chatplusview .cp-recommend-spinner-sub {
	display: block;
	font-size: 0.75em;
	margin-top: 2px;
	opacity: 0.9;
	color: #3d3636 !important;
	padding-left: 1.7em;
}

/* ── Container: inline below each bot message ── */
#chatplusview .cp-recommend-bar {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 10px 0 0 0;
	box-sizing: border-box;
	width: 100%;
}

/* ── Radio input (hidden, keeps existing handler pattern) ── */
#chatplusview .cp-recommend-bar input[type="radio"] {
	display: none;
}

/* ── Quick Reply Button (rounded rectangle, full width) ──
   background, border-color, color, font-size, font-weight are set dynamically
   via /api/chat/style/ from the 選択肢 (themeParams.choice / choicetext /
   selectfontsize / selectfontweight 等) admin setting. */
#chatplusview .cp-recommend-bar label {
	display: block;
	width: 100%;
	padding: 10px 6px;
	color: #000000;
	background: #ffffff;
	border: 1px solid #dddddd;
	border-radius: 8px;
	font-size: 0.75em;
	font-family: inherit;
	cursor: pointer;
	line-height: 1.35;
	white-space: normal;
	word-break: break-word;
	font-weight: bold;
	text-align: left;
	box-sizing: border-box;
	transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	animation: cp-recommend-fadeIn 0.3s ease both;
}

/* stagger animation for each button */
#chatplusview .cp-recommend-bar label:nth-child(2) { animation-delay: 0.08s; }
#chatplusview .cp-recommend-bar label:nth-child(4) { animation-delay: 0.16s; }
#chatplusview .cp-recommend-bar label:nth-child(6) { animation-delay: 0.24s; }

@keyframes cp-recommend-fadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── Hover ── */
#chatplusview:not(.end) .cp-recommend-bar label:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	opacity: 0.85;
}

/* ── Active/press ── */
#chatplusview .cp-recommend-bar label:active {
	transform: scale(0.97);
}

/* ── Selected state ── */
#chatplusview .cp-recommend-bar input[type="radio"]:checked + label {
	cursor: default;
	opacity: 0.9;
}

/* ── Disabled state ── */
#chatplusview .cp-recommend-bar input[type="radio"]:disabled + label {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
}

/* ── Chat ended ── */
#chatplusview.end .cp-recommend-bar label {
	cursor: default;
	pointer-events: none;
	opacity: 0.4;
}

/* ── Notice: 質問候補表示時の注意書き ── */
#chatplusview .cp-recommend-notice {
	padding: 6px 0 0 0;
	font-size: 0.9em;
	line-height: 1.4;
	white-space: pre-wrap;
	word-break: break-word;
}

/* 文頭表示時は回答文との間に1行分の空きを入れる */
#chatplusview .cp-recommend-notice-pre {
	margin-top: 1.4em;
	padding: 0;
}
